package cn.globalph.housekeeper.utils

import java.text.SimpleDateFormat
import java.util.*

class TimeUtil {
    companion object{


        fun getNextDay():String{
            val sdf = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault())
            val calendar = Calendar.getInstance()
            val day = calendar.get(Calendar.DATE)
            calendar.set(Calendar.DATE,day+1)
            return sdf.format(calendar.time)
        }

        fun getPreviewDay():String{
            val sdf = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault())
            val calendar = Calendar.getInstance()
            val day = calendar.get(Calendar.DATE)
            calendar.set(Calendar.DATE,day-1)
            return sdf.format(calendar.time)
        }
    }
}